package com.cw.util;

import com.meterware.httpunit.WebConversation;
import com.meterware.httpunit.WebResponse;
import com.meterware.httpunit.WebTable;

public class DnloadWebData {
	public DnloadWebData() {
		super();
	}

	public String[][] downData(String url) {
		WebConversation wc = new WebConversation();
		WebResponse wresponse = null;
		WebTable webTable = null;
		String[][] datas = null;
		String returnStr[][] = null;
		try {
			wresponse = wc.getResponse(url);

			webTable = wresponse.getTables()[0];
			returnStr = webTable.asText();
		} catch (Exception ex) {
			// return new String[][]{};
			System.out.println("exception is:" + ex.toString());
			javax.swing.JOptionPane.showMessageDialog(null, ex.toString());
		}
		return returnStr;
	}
}
